package hua.mtreader.feature.login.present;

import java.lang.ref.WeakReference;

import hua.mtreader.base.BasePresenter;
import hua.mtreader.feature.login.bean.LoginRequestParam;
import hua.mtreader.feature.login.bean.UserBean;
import hua.mtreader.feature.login.model.ILoginModel;
import hua.mtreader.feature.login.model.LoginModelImpl;
import hua.mtreader.feature.login.view.ILoginView;

/**
 * Created by Administrator on 2017/3/15.
 */

public class LoginPresenter extends BasePresenter<ILoginView>{


    // model 引用
    private ILoginModel mLoginModel;

    public LoginPresenter() {
        mLoginModel = new LoginModelImpl();
    }

    public void login(LoginRequestParam param){

        mLoginModel.login(param, new ILoginModel.LoginListener() {
            @Override
            public void loginSuccess(UserBean userBean) {
                getView().loginSuccess(userBean);
            }
        });
    }



}
